home *** CD-ROM | disk | FTP | other *** search
/ Software USA 4 #11 / Software USA Volume 4.11.iso / mac / Educational / mac06 / usr / include / netinet / netinet⁄ip.h.1 < prev    next >
Encoding:
Text File  |  1998-05-01  |  933 b   |  52 lines  |  [TEXT/SPM ]

  1. /* mac06©1998 by HNS/DSITRI hns@computer.org
  2. ** netinet/ip.h
  3. ** 01.05.1998    HNS        pulled out from ping.c
  4. */
  5.  
  6. #pragma once
  7.  
  8. #include "netinet/in_systm.h"
  9.  
  10. /* socket level for setsockopt() */
  11.  
  12. #define IPPROTO_IP            3
  13.  
  14. /* socket options for IP level */
  15.  
  16. #define IP_MULTICAST_TTL    0
  17. #define IP_MULTICAST_IF        1
  18. #define IP_MULTICAST_LOOP    2
  19. #define IP_OPTIONS            3
  20.  
  21. /* array offset for IP_OPTIONS */
  22.  
  23. #define IPOPT_OPTVAL        0        
  24. #define IPOPT_OLEN            1
  25. #define IPOPT_OFFSET        2
  26.  
  27. /* IP_OPTIONS */
  28.  
  29. #define IPOPT_RR            0        /* record route */
  30. #define IPOPT_MINOFF        0        /* minimum offset */
  31.  
  32. struct ip
  33.     {
  34.     u_char    ip_type;        /* packe type */
  35.     u_char    ip_v;            /* version */
  36.     u_char    ip_hl;            /* header length */
  37.     u_short    ip_tos;
  38.     u_short    ip_len;
  39.     u_short    ip_id;
  40.     u_short    ip_off;
  41.     u_char    ip_ttl;            /* time to live */
  42.     u_char    ip_p;            /* protocol 6=TCP, 17=UDP */
  43.     u_short    ip_sum;            /* checksum */
  44.     struct in_addr    ip_src;
  45.     struct in_addr    ip_dst;
  46.     };
  47.  
  48. /* EOF */
  49.  
  50.  
  51.  
  52.